package com.springcloud.module;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import com.springcloud.common.Remote;
import com.springcloud.common.RemoteImpl;


@RestController
public class IndexController {
    
    @Autowired
    private Remote remote;
    
    @RequestMapping("/index/hello")
    public Object index(@RequestParam(value = "name") String name){
        return remote.hello("hello:" + name);
    }
}
